beginoutdoorscript;

variables;
short choice = 0;
short pc_cycle = 0;

body;

beginstate 0; //INIT_STATE
	if((get_flag(202,4) != 1) && (get_flag(9,15) == 1)) {
		
		reset_dialog();
		add_dialog_str(0, "You run out of the doorway and find yourself in a crumbling ruin of a town, with not a soul in sight. The buildings appear scorched, and only the walls remain.",0);
		add_dialog_str(1, "Brother Oakleaf is stunned. _This is incredible... so much destruction. We cannot begin to guess what the people here endured, nor can we ever right this wrong._", 0);
		add_dialog_str(2, "_Our only recourse is to stop the one who began this all... Kharprev. The only one who could ever control the Order of Flame, and the only one with this warped of a conscience..._",0);
		add_dialog_str(3, "_Come, fellow druids. We have a dragon to slay._", 0);
		add_dialog_str(4, "You and Brother Oakleaf silently walk away from the town, the smoke-filled sky looming above you.",0);
		run_dialog(1);
		set_flag(202,4,1);
	}

break;

beginstate 1; //EXIT_STATE

break;

beginstate 2; //START_STATE

break;

beginstate 10; //Don't let party get too far away
	block_entry(1);
	reset_dialog();
	message_dialog("You begin to look away from the Order of Flame's citadel, towards the desolate valley controlled by the lizards. However, you cannot waste any time exploring this valley, because you've still got a mission.","Besides, that's the way Kharprev's army went. Knowing that, you reluctantly turn back towards the Temple of Flame.");
	break;

beginstate 15;
	if(get_flag(202,0) != 1) {
	reset_dialog();
	add_dialog_str(0, "Suddenly, Brother Oakleaf crouches behind some rubble. He silently motions for you to do the same.",0);
	add_dialog_str(1, "Now that you look at your surroundings more, you're finding it increasingly difficult to keep calm. The sky is so thick with smoke that you can't see the sun, and the only light comes from the lava lining the valley.", 0);
	add_dialog_str(2, "To add to your uneasiness, Brother Oakleaf points out the ungodly large horde of lizards pouring out of the temple. Countless fire lizards and hydras march south, under the watchful eyes of gangs of drakes.",0);
	add_dialog_str(3, "_We timed this perfectly._ Brother Oakleaf mutters. _The temple should be nearly empty, and we should have a clear shot at Kharprev._", 0);
	add_dialog_str(4, "As the last of the horde leaves the gates, Brother Oakleaf signals to move out and charge the temple...",0);
	run_dialog(1); 
	set_flag(202,0,1);
	}
break;

beginstate 20; //Enter the gates
	if(get_flag(202,1) != 1) {
		reset_dialog();
		message_dialog("As Brother Oakleaf guessed, the gates are virtually empty. You have no trouble slipping past the few guards, and soon find yourself inside the gates.","Meanwhile, the Temple itself looms large ahead of you.");
		set_flag(202,1,1); 
		}
break;

beginstate 25; //enter inner courtyard
	if(get_flag(202,2) != 1) {
		reset_dialog();
		message_dialog("You enter the inner court of the Order of Flame's Temple. Ahead lies the Temple itself, which from here looks like a collection of barracks surrounding a smoking pillar.","The barracks out here are eerily empty and quiet... you can only guess what they would be like fully occupied.");
		set_flag(202,2,1);
		}
break;